import React,{Component} from "react"

export default class Search extends Component{

    btn=()=>{
        this.props.getSearchText(this.input.value);
    }
    render(){
        return(
            <div>
                <input type="text" placeholder="请输入搜索关键字" className="searchInput" ref={input=>this.input=input}/>
                <span className="search" onClick={this.btn}>搜索</span>
            </div>
        )
    }
}